$( document ).ready(function() {
	// init delete button
	if ($(".btn-preview").length > 0) {
		$(".btn-preview").on('click', function(e){
			e.preventDefault();
			var reportUrl = $(this).attr('href');
			$.Dialog({
				shadow: true,
				overlay: true,
				icon: '<span class="icon-printer"></span>',
				title: 'Print Preview',
				width: 800,
				height: 600,
				padding: 10,
				onShow: function(_dialog){
 					var content = _dialog.children('.content');
 					content.html('<iframe src="' + reportUrl + '" style="border:none; width: 100%; height: 540px;"/>');
				}
			});
		});
	}
	
});